<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Gregwar\Captcha\CaptchaBuilder;
use Session;

class CodeController extends Controller
{
    //
    public function code()
    {
        ob_end_clean();
        $builder = new CaptchaBuilder;
        $builder-> build(86,34);
        Session::put('code',$builder->getPhrase());
        header('Content-type:image/jpeg');
        $builder->output();
    }
}
